## -*- Makefile -*-
##
## User: demoth.cadaver
## Time: Jan 30, 2012 12:33:09 AM
##
## This file is generated automatically by NetBeans. (Yup, with certain remarks)
##


#### Compiler and tool definitions shared by all build targets #####
CC = gcc
BASICOPTS = -g
CFLAGS = $(BASICOPTS)


# Define the target directories.
TARGETDIR_all=../../release/cooper
QUAKEDIR = /home/daniil/games/quake2-dev

# we may want to move it from baseq2 to cooper folder in future
deploy: all
	cp ${TARGETDIR_all}/game.so ${QUAKEDIR}/baseq2

all: game.so

game.so: $(TARGETDIR_all)/game.so

## Target: all
CFLAGS_all = -fPIC

OBJS_all =  \
	$(TARGETDIR_all)/g_svcmds.o \
	$(TARGETDIR_all)/g_items.o \
	$(TARGETDIR_all)/g_main.o \
	$(TARGETDIR_all)/g_target.o \
	$(TARGETDIR_all)/g_weapon.o \
	$(TARGETDIR_all)/g_chase.o \
	$(TARGETDIR_all)/g_ai.o \
	$(TARGETDIR_all)/g_trigger.o \
	$(TARGETDIR_all)/g_combat.o \
	$(TARGETDIR_all)/g_func.o \
	$(TARGETDIR_all)/g_monster.o \
	$(TARGETDIR_all)/g_phys.o \
	$(TARGETDIR_all)/g_turret.o \
	$(TARGETDIR_all)/g_misc.o \
	$(TARGETDIR_all)/g_cmds.o \
	$(TARGETDIR_all)/g_spawn.o \
	$(TARGETDIR_all)/g_utils.o \
	$(TARGETDIR_all)/weapon.o \
	$(TARGETDIR_all)/view.o \
	$(TARGETDIR_all)/client.o \
	$(TARGETDIR_all)/trail.o \
	$(TARGETDIR_all)/hud.o \
	$(TARGETDIR_all)/savegame.o \
	$(TARGETDIR_all)/chick.o \
	$(TARGETDIR_all)/infantry.o \
	$(TARGETDIR_all)/supertank.o \
	$(TARGETDIR_all)/soldier.o \
	$(TARGETDIR_all)/berserker.o \
	$(TARGETDIR_all)/medic.o \
	$(TARGETDIR_all)/boss32.o \
	$(TARGETDIR_all)/boss3.o \
	$(TARGETDIR_all)/boss31.o \
	$(TARGETDIR_all)/parasite.o \
	$(TARGETDIR_all)/float.o \
	$(TARGETDIR_all)/hover.o \
	$(TARGETDIR_all)/insane.o \
	$(TARGETDIR_all)/gunner.o \
	$(TARGETDIR_all)/move.o \
	$(TARGETDIR_all)/tank.o \
	$(TARGETDIR_all)/flipper.o \
	$(TARGETDIR_all)/boss2.o \
	$(TARGETDIR_all)/mutant.o \
	$(TARGETDIR_all)/gladiator.o \
	$(TARGETDIR_all)/brain.o \
	$(TARGETDIR_all)/flyer.o \
	$(TARGETDIR_all)/flash.o \
	$(TARGETDIR_all)/shared.o


# Link or archive
SHAREDLIB_FLAGS_all = -shared 
$(TARGETDIR_all)/game.so: $(TARGETDIR_all) $(OBJS_all) $(DEPLIBS_all)
	$(LINK.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ $(OBJS_all) $(SHAREDLIB_FLAGS_all) $(LDLIBS_all)


# Compile source files into .o files
$(TARGETDIR_all)/g_svcmds.o: $(TARGETDIR_all) g_svcmds.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_svcmds.c

$(TARGETDIR_all)/g_items.o: $(TARGETDIR_all) g_items.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_items.c

$(TARGETDIR_all)/g_main.o: $(TARGETDIR_all) g_main.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_main.c

$(TARGETDIR_all)/g_target.o: $(TARGETDIR_all) g_target.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_target.c

$(TARGETDIR_all)/g_weapon.o: $(TARGETDIR_all) g_weapon.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_weapon.c

$(TARGETDIR_all)/g_chase.o: $(TARGETDIR_all) g_chase.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_chase.c

$(TARGETDIR_all)/g_ai.o: $(TARGETDIR_all) g_ai.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_ai.c

$(TARGETDIR_all)/g_trigger.o: $(TARGETDIR_all) g_trigger.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_trigger.c

$(TARGETDIR_all)/g_combat.o: $(TARGETDIR_all) g_combat.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_combat.c

$(TARGETDIR_all)/g_func.o: $(TARGETDIR_all) g_func.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_func.c

$(TARGETDIR_all)/g_monster.o: $(TARGETDIR_all) g_monster.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_monster.c

$(TARGETDIR_all)/g_phys.o: $(TARGETDIR_all) g_phys.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_phys.c

$(TARGETDIR_all)/g_turret.o: $(TARGETDIR_all) g_turret.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_turret.c

$(TARGETDIR_all)/g_misc.o: $(TARGETDIR_all) g_misc.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_misc.c

$(TARGETDIR_all)/g_cmds.o: $(TARGETDIR_all) g_cmds.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_cmds.c

$(TARGETDIR_all)/g_spawn.o: $(TARGETDIR_all) g_spawn.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_spawn.c

$(TARGETDIR_all)/g_utils.o: $(TARGETDIR_all) g_utils.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ g_utils.c

$(TARGETDIR_all)/weapon.o: $(TARGETDIR_all) player/weapon.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ player/weapon.c

$(TARGETDIR_all)/view.o: $(TARGETDIR_all) player/view.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ player/view.c

$(TARGETDIR_all)/client.o: $(TARGETDIR_all) player/client.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ player/client.c

$(TARGETDIR_all)/trail.o: $(TARGETDIR_all) player/trail.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ player/trail.c

$(TARGETDIR_all)/hud.o: $(TARGETDIR_all) player/hud.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ player/hud.c

$(TARGETDIR_all)/savegame.o: $(TARGETDIR_all) savegame/savegame.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ savegame/savegame.c

$(TARGETDIR_all)/chick.o: $(TARGETDIR_all) monster/chick/chick.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/chick/chick.c

$(TARGETDIR_all)/infantry.o: $(TARGETDIR_all) monster/infantry/infantry.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/infantry/infantry.c

$(TARGETDIR_all)/supertank.o: $(TARGETDIR_all) monster/supertank/supertank.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/supertank/supertank.c

$(TARGETDIR_all)/soldier.o: $(TARGETDIR_all) monster/soldier/soldier.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/soldier/soldier.c

$(TARGETDIR_all)/berserker.o: $(TARGETDIR_all) monster/berserker/berserker.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/berserker/berserker.c

$(TARGETDIR_all)/medic.o: $(TARGETDIR_all) monster/medic/medic.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/medic/medic.c

$(TARGETDIR_all)/boss32.o: $(TARGETDIR_all) monster/boss3/boss32.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/boss3/boss32.c

$(TARGETDIR_all)/boss3.o: $(TARGETDIR_all) monster/boss3/boss3.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/boss3/boss3.c

$(TARGETDIR_all)/boss31.o: $(TARGETDIR_all) monster/boss3/boss31.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/boss3/boss31.c

$(TARGETDIR_all)/parasite.o: $(TARGETDIR_all) monster/parasite/parasite.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/parasite/parasite.c

$(TARGETDIR_all)/float.o: $(TARGETDIR_all) monster/float/float.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/float/float.c

$(TARGETDIR_all)/hover.o: $(TARGETDIR_all) monster/hover/hover.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/hover/hover.c

$(TARGETDIR_all)/insane.o: $(TARGETDIR_all) monster/insane/insane.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/insane/insane.c

$(TARGETDIR_all)/gunner.o: $(TARGETDIR_all) monster/gunner/gunner.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/gunner/gunner.c

$(TARGETDIR_all)/move.o: $(TARGETDIR_all) monster/misc/move.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/misc/move.c

$(TARGETDIR_all)/tank.o: $(TARGETDIR_all) monster/tank/tank.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/tank/tank.c

$(TARGETDIR_all)/flipper.o: $(TARGETDIR_all) monster/flipper/flipper.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/flipper/flipper.c

$(TARGETDIR_all)/boss2.o: $(TARGETDIR_all) monster/boss2/boss2.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/boss2/boss2.c

$(TARGETDIR_all)/mutant.o: $(TARGETDIR_all) monster/mutant/mutant.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/mutant/mutant.c

$(TARGETDIR_all)/gladiator.o: $(TARGETDIR_all) monster/gladiator/gladiator.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/gladiator/gladiator.c

$(TARGETDIR_all)/brain.o: $(TARGETDIR_all) monster/brain/brain.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/brain/brain.c

$(TARGETDIR_all)/flyer.o: $(TARGETDIR_all) monster/flyer/flyer.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ monster/flyer/flyer.c

$(TARGETDIR_all)/flash.o: $(TARGETDIR_all) ../q2-engine/common/shared/flash.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ ../q2-engine/common/shared/flash.c

$(TARGETDIR_all)/shared.o: $(TARGETDIR_all) ../q2-engine/common/shared/shared.c
	$(COMPILE.c) $(CFLAGS_all) $(CPPFLAGS_all) -o $@ ../q2-engine/common/shared/shared.c



#### Clean target deletes all generated files ####
clean:
	rm -f \
		$(TARGETDIR_all)/game.so \
		$(TARGETDIR_all)/g_svcmds.o \
		$(TARGETDIR_all)/g_items.o \
		$(TARGETDIR_all)/g_main.o \
		$(TARGETDIR_all)/g_target.o \
		$(TARGETDIR_all)/g_weapon.o \
		$(TARGETDIR_all)/g_chase.o \
		$(TARGETDIR_all)/g_ai.o \
		$(TARGETDIR_all)/g_trigger.o \
		$(TARGETDIR_all)/g_combat.o \
		$(TARGETDIR_all)/g_func.o \
		$(TARGETDIR_all)/g_monster.o \
		$(TARGETDIR_all)/g_phys.o \
		$(TARGETDIR_all)/g_turret.o \
		$(TARGETDIR_all)/g_misc.o \
		$(TARGETDIR_all)/g_cmds.o \
		$(TARGETDIR_all)/g_spawn.o \
		$(TARGETDIR_all)/g_utils.o \
		$(TARGETDIR_all)/weapon.o \
		$(TARGETDIR_all)/view.o \
		$(TARGETDIR_all)/client.o \
		$(TARGETDIR_all)/trail.o \
		$(TARGETDIR_all)/hud.o \
		$(TARGETDIR_all)/savegame.o \
		$(TARGETDIR_all)/chick.o \
		$(TARGETDIR_all)/infantry.o \
		$(TARGETDIR_all)/supertank.o \
		$(TARGETDIR_all)/soldier.o \
		$(TARGETDIR_all)/berserker.o \
		$(TARGETDIR_all)/medic.o \
		$(TARGETDIR_all)/boss32.o \
		$(TARGETDIR_all)/boss3.o \
		$(TARGETDIR_all)/boss31.o \
		$(TARGETDIR_all)/parasite.o \
		$(TARGETDIR_all)/float.o \
		$(TARGETDIR_all)/hover.o \
		$(TARGETDIR_all)/insane.o \
		$(TARGETDIR_all)/gunner.o \
		$(TARGETDIR_all)/move.o \
		$(TARGETDIR_all)/tank.o \
		$(TARGETDIR_all)/flipper.o \
		$(TARGETDIR_all)/boss2.o \
		$(TARGETDIR_all)/mutant.o \
		$(TARGETDIR_all)/gladiator.o \
		$(TARGETDIR_all)/brain.o \
		$(TARGETDIR_all)/flyer.o \
		$(TARGETDIR_all)/flash.o \
		$(TARGETDIR_all)/shared.o
	rm -f -r $(TARGETDIR_all)


# Create the target directory (if needed)
$(TARGETDIR_all):
	mkdir -p $(TARGETDIR_all)


# Enable dependency checking
.KEEP_STATE:
.KEEP_STATE_FILE:.make.state.GNU-amd64-Linux

